import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

// import './assets/gloable.css'
import elementIcon from "./plugins/icons"
import  ECharts from 'vue-echarts'
import 'echarts'
import request from "@/utils/request";
import * as ElIconModules from './plugins/icons'

const app = createApp(App)
app.use(router).use(ElementPlus, {
    locale: zhCn,
  }).use(elementIcon)
app.component('ECharts',ECharts)

app.config.globalProperties.request=request
app.mount('#app')

for (const iconName in ElIconModules) {
  app.component(iconName, ElIconModules[iconName])
}